\hypertarget{communication_8c}{
\section{/home/noxon/coding/C/esiee-in301/libcomm/communication.c File Reference}
\label{communication_8c}\index{/home/noxon/coding/C/esiee-in301/libcomm/communication.c@{/home/noxon/coding/C/esiee-in301/libcomm/communication.c}}
}
{\tt \#include \char`\"{}communication.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
\hyperlink{structmodule__struct}{module} $\ast$ \hyperlink{communication_8c_63a260a1d03237fc4f53b96f3b8586b1}{init\_\-module} (char $\ast$nom, int type, int bourse)
\item 
void \hyperlink{communication_8c_49502824c96a73bc576b4cf9e89dfad8}{log\_\-srv} (const \hyperlink{structserver__struct}{server} $\ast$srv, char $\ast$un\_\-msg)
\item 
void \hyperlink{communication_8c_21b24c0798c5ecdfd4cb777e5438a388}{log\_\-msg\_\-srv} (const \hyperlink{structserver__struct}{server} $\ast$srv, \hyperlink{structmsg__struct}{msg} $\ast$damsg, char $\ast$un\_\-msg)
\end{CompactItemize}


\subsection{Function Documentation}
\hypertarget{communication_8c_63a260a1d03237fc4f53b96f3b8586b1}{
\index{communication.c@{communication.c}!init\_\-module@{init\_\-module}}
\index{init\_\-module@{init\_\-module}!communication.c@{communication.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf module}$\ast$ init\_\-module (char $\ast$ {\em nom}, \/  int {\em type}, \/  int {\em bourse})}}
\label{communication_8c_63a260a1d03237fc4f53b96f3b8586b1}


Permet d'initialiser un module \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em nom}]le nom du module \item[{\em type}]le type du module: voir l'enum TYPE \item[{\em bourse}]la bourse dans laquelle est placé le module \end{description}
\end{Desc}


Definition at line 3 of file communication.c.

References module\_\-struct::bourse\_\-id, log\_\-smth(), module\_\-struct::name, module\_\-struct::srv, and module\_\-struct::type.

Referenced by main().\hypertarget{communication_8c_21b24c0798c5ecdfd4cb777e5438a388}{
\index{communication.c@{communication.c}!log\_\-msg\_\-srv@{log\_\-msg\_\-srv}}
\index{log\_\-msg\_\-srv@{log\_\-msg\_\-srv}!communication.c@{communication.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void log\_\-msg\_\-srv (const {\bf server} $\ast$ {\em srv}, \/  {\bf msg} $\ast$ {\em damsg}, \/  char $\ast$ {\em un\_\-msg})}}
\label{communication_8c_21b24c0798c5ecdfd4cb777e5438a388}


Permet de logguer les messages reçus par les serveurs. Placé dans \hyperlink{communication_8h}{communication.h} puisque utilisé uniquement pour la communication par socket. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em srv}]le serveur d'où le log émane \item[{\em damsg}]le message reçu \item[{\em un\_\-msg}]message d'explication lié à l'ordre de transaction \end{description}
\end{Desc}


Definition at line 19 of file communication.c.

References log\_\-msg(), and server\_\-struct::name.

Referenced by launch\_\-acquisition(), launch\_\-execution(), launch\_\-interboursier(), and launch\_\-terminal().\hypertarget{communication_8c_49502824c96a73bc576b4cf9e89dfad8}{
\index{communication.c@{communication.c}!log\_\-srv@{log\_\-srv}}
\index{log\_\-srv@{log\_\-srv}!communication.c@{communication.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void log\_\-srv (const {\bf server} $\ast$ {\em srv}, \/  char $\ast$ {\em un\_\-msg})}}
\label{communication_8c_49502824c96a73bc576b4cf9e89dfad8}


Permet de logguer les communications des serveurs. Placé dans \hyperlink{communication_8h}{communication.h} puisque utilisé uniquement pour la communication par socket. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em srv}]le serveur d'où le log émane \item[{\em un\_\-msg}]message d'explication lié à l'ordre de transaction \end{description}
\end{Desc}


Definition at line 13 of file communication.c.

References comm\_\-type, server\_\-struct::my\_\-port, server\_\-struct::name, and private\_\-write\_\-log().

Referenced by launch\_\-acquisition(), launch\_\-execution(), launch\_\-interboursier(), and launch\_\-terminal().